package com.wutong.teacher_server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wutong.common_server.result.DataTablePageDto;
import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author wutong
 * @since 2020-11-05
 */
@TableName("t_files")
@ApiModel(value="Files对象", description="")
@NoArgsConstructor
@Getter
@Setter
@Accessors(chain = true)
public class Files extends DataTablePageDto<Files> implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private Integer userId;

    private String oldFileName;

    private String newFileName;

    private String suffix;

    private String filePath;

    private String fileSize;

    private String fileType;

    private Integer isImg;

    private Integer downCounts;

    private Date uploadTime;

    public Files(Integer userId, String oldFileName, String newFileName, String suffix, String filePath, String fileSize, String fileType, Integer isImg, Integer downCounts) {
        this.userId = userId;
        this.oldFileName = oldFileName;
        this.newFileName = newFileName;
        this.suffix = suffix;
        this.filePath = filePath;
        this.fileSize = fileSize;
        this.fileType = fileType;
        this.isImg = isImg;
        this.downCounts = downCounts;
    }

    @Override
    public String toString() {
        return "Files{" +
        "id=" + id +
        ", userId=" + userId +
        ", oldFileName=" + oldFileName +
        ", newFileName=" + newFileName +
        ", suffix=" + suffix +
        ", filePath=" + filePath +
        ", fileSize=" + fileSize +
        ", fileType=" + fileType +
        ", isImg=" + isImg +
        ", downCounts=" + downCounts +
        ", uploadTime=" + uploadTime +
        "}";
    }
}
